package com.usian.common.vo;

import lombok.Data;
import lombok.ToString;

/*
 * 作者：m鹏h
 * 时间；2023/7/31 15:57
 * 描述：
 **/
@Data
@ToString
public class Result<T> {
    private String code;
    private String message;

    private T data;


    public static Result<Object> Success(Object data){
        Result<Object> result = new Result<>();
        result.setCode("1");
        result.setData(data);
        result.setMessage("YES");
        return result;
    }

    public static Result<Object> Error(){
        Result<Object> result = new Result<>();
        result.setCode("2");
        result.setMessage("NO");
        return result;
    }



}
